from sqlalchemy import Column, String, Integer, DateTime, ForeignKey
from sqlalchemy.dialects.postgresql import UUID
from app.db.base_class import Base
from .archivable import Archivable

# 任务分类库模型
class TaskClassificationLibrary(Base, Archivable):
    __tablename__ = 'task_classification_library'
    # 分类名称
    category_name = Column("category_name", String)
    # 使用次数
    usage_count = Column("usage_count", Integer, default=0)
    # 用户id
    user_id = Column(UUID(as_uuid=True), ForeignKey("user.id"))